From cc408deb86082737cf73c7d139f13a9bd56b1626 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sat, 16 Jan 2016 11:16:22 +0100 Subject: [PATCH] base: fix half reference conversion expecting zeroed target As discovered in bug #760703 the reference path is currently expecting zeroed memory, fix by explicitly zeroing last 32bit of mantissa. --- babl/base/type-half.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babl/base/type-half.c b/babl/base/type-half.c index e45e34a..57b5d7d 100644 --- a/babl/base/type-half.c +++ b/babl/base/type-half.c @@ -283,7 +283,7 @@ static void halfp2doubles(void *target, void *source, long numel) *xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits } } - xp++; // Skip over the remaining 32 bits of the mantissa + *xp++ = 0; // Skip over and zero the remaining 32 bits of the mantissa } } -- 2.30.2